<template>
  <div class="container-header head-form" slot="header">
    <Form class="search store-list-search">
      <Row>
        <Col span="7">
          <FormItem label="门店名称">
            <Input v-model.trim="list.form.storeName" placeholder="门店名称" @on-enter="onSearchBtnClick"/>
          </FormItem>
          <FormItem label="营业执照号">
            <Input v-model.trim="list.form.businessLicenseNo" placeholder="营业执照号" @on-enter="onSearchBtnClick"/>
          </FormItem>
        </Col>
        <Col span="7">
          <FormItem label="联系人姓名">
            <Input v-model.trim="list.form.ownerName" placeholder="联系人姓名" @on-enter="onSearchBtnClick"/>
          </FormItem>
          <FormItem label="身份证号">
            <Input v-model.trim="list.form.ownerIdcardNo" placeholder="身份证号" @on-enter="onSearchBtnClick"/>
          </FormItem>
        </Col>
        <Col span="7">
          <FormItem label="手机号">
            <Input v-model.trim="list.form.storePhone" placeholder="手机号" @on-enter="onSearchBtnClick"/>
          </FormItem>
          <FormItem label="认证审核状态">
            <SelectList
              v-model="list.form.auditStatus"
              listType="selfList"
              :selfList='checkList'
            />
          </FormItem>
        </Col>
        <Col class-name="search" span="2">
          <Button class="btn-search large" type="primary" icon="ios-search" @click="onSearchBtnClick"></Button>
        </Col>
      </Row>
    </Form>
  </div>
</template>

<script>
  import SelectList from '@/components/SelectList';
  export default {
    props: {
      list: {
        type: Object,
        default: ''
      }
    },
    data() {
      return {
        currValue: [],
        checkList: [
          { text: '待审核', value: 0 },
          { text: '审核未通过', value: 1 },
          { text: '审核通过', value: 2 },
        ],
        brandList: []
      }
    },
    components: {
      SelectList,
    },
    mounted() {
    },
    methods: {
      getBrand() {
        this.$ajaxGet('product/common/supplier_brand').then(res => {
          this.brandList = res.map(item => {
            item.value = item.brandId
            item.text = item.brandName
          })
        })
      },
      onSearchBtnClick() {
        this.$emit('onSearchBtnClick')
      },
      onAddBtnClick() {
        this.$emit('onAddBtnClick')
      },
    },
    watch: {
    }
  }
</script>
